FROM php:7.1.33-fpm
RUN echo "deb https://mirrors.aliyun.com/debian/ stable main contrib non-free" > /etc/apt/sources.list
RUN apt-get update && apt-get install -y  \
    zip  \
    curl  \
    git  \
    unzip  \
    librabbitmq-dev \
    libfreetype6-dev  \
    libjpeg62-turbo-dev  \
    libmcrypt-dev  \
    libpng-dev  \
    zlib1g-dev  \
    libzip-dev \
    && pecl install redis-5.3.7  && docker-php-ext-enable  redis  \
    && pecl install amqp-1.9.4 && docker-php-ext-enable amqp \
    && docker-php-ext-install pdo pdo_mysql mysqli pcntl bcmath sockets gd zip\
#安装composer
    && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
    && composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ \
	&& composer self-update
#命令
CMD ["php-fpm"]